<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!--==================================后台传过来的数据============================  -->
<div class="none">
	<div id="currentPage">${page}</div>
	<div id="totalPages">${totoalPage}</div>
	<div id="currentCocourseCode">${cocourseCode}</div>
	<div id="currentCid">${cid}</div>
</div>
<!--==================================内容=========================================  -->
<div class="Box" style="margin-top: 15px;">
    <!--===============================标题=======================================  -->
	<div class="Box-head Border" style="padding-left: 25px;">
		<label class="Labelstyle">考生信息管理</label>
	</div>
	<!--==============================具体的内容====================================  -->
	<div class="Box-content" style="padding: 25px;">
		<!-- ==========================显示的选择菜单===============================-->
		<div class="funxtion Box-head Border " style="padding-top:20px;padding-bottom:20px;margin-bottom:10px;">
			<div class="span3 offset1 ">
				<select id="courseName">
				   <option value='0'>不限</option>
					<c:forEach var="coName" items="${courseName}">
						<option value=${coName.cocourseCode}>${coName.coname}</option>
					</c:forEach>
				</select>
			</div>
			<div class="span4 offset1">
				<select id="classes">
				<option value='0'>不限</option>
				</select>
			</div>
			<div class="offset1">
			<input type="button" class="btn btn-info"  id="selsect" value="查询">
			</div>
		</div>

	    <!-- ==============================显示的学生信息=========================================-->
		<div>
			<table class="table table-hover table-striped table-bordered">

				<thead>
					<tr>
						<th width="30%">学号</th>
						<th width="15%">姓名</th>
						<th width="15%">性别</th>
						<th width="15%">年级</th>
						<th width="25%">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="stu" items="${student}">
						<tr>
							<td>${stu.unumber}</td>
							<td>${stu.uname}</td>
							<td>${stu.ugender}</td>
							<td>${stu.ugrade }</td>
							<td ><input type="button" class="btn btn-info changeStudent" data-toggle="modal" data-target="#changeStudent" data-id=${stu.uid} value="编辑">
							<input type="button" class="btn btn-warning delete" data-id=${stu.uid}   value="删除">
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
		<script>
	
		</script>
		<!-- ===========================页按钮的显示======================-->
		<div id="example" class="center"></div>
		<!-- ===========================功能按钮========================== -->
		<div class="funxtion Box-head Border " style="padding-top:20px;padding-bottom:20px;margin-bottom:10px;">
	
			<div class="span4 offset1">
				<a href="#insertStudent" role="button" class="btn btn-info" data-toggle="modal">新增学生信息</a></div>
			<form action="insertStudents" method="post" enctype="multipart/form-data">
				<div class="span4">
					<input type="file" name="excel"  class="btn btn-info"title="导入学生信息"></div>
				<div class="span2">
					<input type="submit" value="提交" class="btn btn-info"></div>
			</form>
		</div>
	</div>
</div>
<!-- ======================================编辑用户信息 ====================================-->
<div id="changeStudent" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">学生信息</h3>
  </div>
  <div class="modal-body">
  <form class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="oldPassword" >学号</label>
				<div class="controls">
					<input type="text"   data-uid="" id="changeNumber" placeholder="学号">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="Password">姓名</label>
				<div class="controls">
					<input type="text" id="changeName" placeholder="姓名">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword">性别</label>
				<div class="controls">
					<input type="text" id="changeGender" placeholder="性别">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword">年级</label>
				<div class="controls">
					<input type="text" id="changeGrade" placeholder="年级">
				</div>
			</div>
		</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="changeStudent_btn">Save changes</button>
  </div>
</div>


<!-- ======================================新增用户信息====================================== -->
<div id="insertStudent" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">学生信息</h3>
  </div>
  <div class="modal-body">
  <form class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="oldPassword" >学号</label>
				<div class="controls">
					<input type="text"  id="insertNumber" placeholder="学号">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="Password">姓名</label>
				<div class="controls">
					<input type="text" id="insertName" placeholder="姓名">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword">性别</label>
				<div class="controls">
					<input type="text" id="insertGender" placeholder="性别">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword">年级</label>
				<div class="controls">
					<input type="text" id="insertGrade" placeholder="年级">
				</div>
			</div>
		</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="insertStudent_btn">Save changes</button>
  </div>
</div>


<script src="<%=basePath%>JS/StudentInformation.js"></script>